/**
 * @Project PONTienLenMienNam
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate May 10, 2011
 * @Createtime 10:28:37 AM
 */

package com.gigalaxy.game
{

	public class ExtensionCMD
	{
		public static var CREATE_ROOM:String = "createRoom";
		public static var DEAL_CARDS:String = "a";
		public static var FINISHED:String = "k";
		public static var GIVE_UP:String = "giveUp";
		public static var JOIN_ROOM:String = "joinRoom";
		public static var ROUND_FINISHED:String = "roundFinished";
		public static var PICK_OR_TAKE_CARD_TURN:String = "b"; // notify user in turn
		public static var OUT_OF_PON:String = "outOfPon";
		public static var RESTART:String = "restart";
		public static var SET_AVATAR:String = "setAvatar";
		public static var SET_FULL_NAME:String = "setFullName";
		public static var START:String = "start";
		public static var THROW_CARDS:String = "f"; // throwCards
		public static var USER_ENTER:String = "userEnter";
		public static var USER_LEAVE:String = "userLeave";
		public static var USER_LIST:String = "userList";
		public static var CHARGE:String = "$";
		public static var OWNER_CHANGE:String = "ownerChange";
		public static var KICK:String = "kick";
		public static var SET_PON_ID:String = "setPonID";
		public static var CONFIG_GAME:String = "cfg";
		public static var TAKE_CARD:String = "d"; // captureCard
		public static var PICK_CARD:String = "c"; // receiveCard
		public static var THROW_CARD_TURN:String = "e";
		public static var REVEAL_PHOMS_TURN:String = "g";
		public static var REVEAL_PHOMS:String = "h";
		public static var SEND_CARD_TURN:String = "i";
		public static var SEND_CARD:String = "j";
		public static var LEAVE_ROOM:String = "leaveRoom";
		public static var POT:String = "ga";

		public static function log(cmd:String):String
		{
			var res:String = "";

			switch (cmd)
			{
				case DEAL_CARDS:
					res = "dealCard";
					break;
				case PICK_OR_TAKE_CARD_TURN:
					res = "pickOrTakeCardTurn";
					break;
				case PICK_CARD:
					res = "pickCard";
					break;
				case TAKE_CARD:
					res = "takeCard";
					break;
				case POT:
					res = "ga";
					break;
				case THROW_CARD_TURN:
					res = "throwCardTurn";
					break;
				case THROW_CARDS:
					res = "throwCards";
					break;
				case REVEAL_PHOMS_TURN:
					res = "revealPhomsTurn";
					break;
				case REVEAL_PHOMS:
					res = "revealPhoms";
					break;
				case SEND_CARD_TURN:
					res = "sendCardTurn"
					break;
				case SEND_CARD:
					res = "sendCard"
					break;
				case FINISHED:
					res = "finished";
					break;
				default:
					res = cmd;
					break;
			}

			trace(res);
			return res;
		}
	}
}
